package org.gavin.service.impl;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Service;

/**
 * SubMsgListener
 *
 * @author grl
 * @date 2025/2/11
 */
@Service
public class SubMsgListener implements MessageListener {
    @Override
    public void onMessage(Message message, byte[] pattern) {

        System.out.println("收到消息：" + new String(message.getBody()) + " 通道 "+ new String(pattern));
    }
}
